package com.smartleanx.module.hrm.api.employee;
import com.smartleanx.framework.common.pojo.CommonResult;
import com.smartleanx.module.hrm.api.employee.dto.EmployeeInfoRespDto;
import com.smartleanx.module.hrm.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.List;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 用户")
public interface EmployeeApi {


    String PREFIX = ApiConstants.PREFIX + "/employee";


    @GetMapping(PREFIX + "/list")
    @Operation(summary = "获取用户基本信息")
    @Parameter(name = "ids", description = "岗位编号数组", example = "1,2", required = true)
    CommonResult<List<EmployeeInfoRespDto>> getEmployeeInfo(@RequestParam("ids") Collection<Long> ids);


    @GetMapping(PREFIX + "/getById")
    @Operation(summary = "获取用户基本信息")
    @Parameter(name = "id", description = "账号id", example = "1", required = true)
    CommonResult<EmployeeInfoRespDto> getByIda(@RequestParam("id") Long id);



}


